﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ValidBox4Mvc.ValidRules;

namespace Domain.Model
{
    /// <summary>
    /// 通知资讯
    /// </summary>
    public class Notity : Entity
    {
        /// <summary>
        /// 标题
        /// </summary>
        [Required]
        [Length(20, ErrorMessage = "标题为1到20字之间")]
        public string Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>      
        [Required(ErrorMessage = "内容不能为空")]
        public string Contents { get; set; }

        /// <summary>
        /// 创建人ID
        /// </summary>
        [Required]
        public Guid CreatorId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public virtual User Creator { get; set; }
    }
}
